readParcelableArray
open fun <T> readParcelableArray(@NonNull in: Parcel, @Nullable loader: ClassLoader, @NonNull clazz: Class<T>): Array<T>(source)
Deprecated
This method incurs a performance penalty on SDK 33 and below. Use readParcelableArrayTyped instead.
Same as readParcelableArray but accepts clazz
parameter as the type required for each item. Compatibility behavior:
- SDK 34 and later, this method matches platform behavior.
- SDK 33 and below, this method will not check the array elements' types.
Throws
Throws BadParcelableException if the item to be deserialized is not an instance of that class or any of its children classes or there was an error trying to instantiate an element.